<admintpl file="headerEx" />
<title>{:L('ADMIN_LINK_INDEX')}</title>

<!--responsive table-->
<link href="__PUBLIC__/TciocEx/css/table-responsive.css" rel="stylesheet" />
</head>

<!-- Placed js at the end of the document so the pages load faster -->
<body class="sticky-header">
<section>
	<!-- main content start-->
	<div class="full-content" >
		<!--body wrapper start-->
		<div class="wrapper js-check-wrap">
			<div class="row">
				<div class="col-sm-12">
					<section class="panel">
						<header class="panel-heading custom-tab turquoise-tab">
							<ul class="nav nav-tabs">
								<li class="active"><a href="{:U('link/index')}"><i class="fa fa-list-ul"></i> {:L('ADMIN_LINK_INDEX')}</a></li>
								<li><a href="{:U('link/add')}"><i class="fa fa-plus"></i> {:L('ADMIN_LINK_ADD')}</a></li>
							</ul>
						</header>
						<div class="panel-body">
							<form method="post" class="js-ajax-form" action="{:U('Link/listorders')}">
								<div class="btn-group m-bot15">
									<button class="btn btn-primary btn-small js-ajax-submit" type="submit">{:L('SORT')}</button>
									<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('link/toggle',array('display'=>1))}" data-subcheck="true">{:L('DISPLAY')}</button>
									<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('link/toggle',array('hide'=>1))}" data-subcheck="true">{:L('HIDE')}</button>
								</div>
								<php>
									$status=array("1"=>L('DISPLAY'),"0"=>L('HIDDEN'));
									$type=array("1"=>"合作伙伴","2"=>"友情链接");
								</php>
								<section id="no-more-tables">
									<table class="table table-bordered table-striped table-hover table-condensed cf" id="menus-table">
										<thead>
										<tr>
											<th width="16"><label><input   type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
											<th >{:L('SORT')}</th>
											<th >ID</th>
											<th>{:L('NAME')}</th>
											<th>{:L('LINK_ADDRESS')}</th>
											<th >类型</th>
											<th >{:L('STATUS')}</th>
											<th >{:L('ACTIONS')}</th>
										</tr>
										</thead>
										<tbody>
										<foreach name="links" item="vo">
											<tr>
												<td><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo.link_id}"></td>
												<td><input  style="border-radius: 6px;text-align: center" name='listorders[{$vo.link_id}]' class="input input-order mr5" type='text' size='3' value='{$vo.listorder}'></td>
												<td>{$vo.link_id}</td>
												<td>{$vo.link_name}</td>
												<td><a href="{$vo.link_url}" target="_blank">{$vo.link_url}</a></td>
												<td>{$type[$vo['link_type']]}</td>
												<td>{$status[$vo['link_status']]}</td>
												<td>
													<a href="{:U('link/edit',array('id'=>$vo['link_id']))}">{:L('EDIT')}</a>|
													<a href="{:U('link/delete',array('id'=>$vo['link_id']))}" class="js-ajax-delete">{:L('DELETE')}</a>
												</td>
											</tr>
										</foreach>
										</tbody>
										<tfoot>
										<tr>
											<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
											<th >{:L('SORT')}</th>
											<th >ID</th>
											<th>{:L('NAME')}</th>
											<th>{:L('LINK_ADDRESS')}</th>
											<th >类型</th>
											<th >{:L('STATUS')}</th>
											<th >{:L('ACTIONS')}</th>
										</tr>
										</tfoot>
									</table>
								</section>
								<div class="btn-group m-bot15">
									<button class="btn btn-primary btn-small js-ajax-submit" type="submit">{:L('SORT')}</button>
									<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('link/toggle',array('display'=>1))}" data-subcheck="true">{:L('DISPLAY')}</button>
									<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('link/toggle',array('hide'=>1))}" data-subcheck="true">{:L('HIDE')}</button>
								</div>
							</form>
						</div>
					</section>
				</div>
			</div>
		</div>

	</div>
	</div>
	</div>
	<!--body wrapper end-->

	<!--footer section start-->
	<footer>
		<admintpl file="copyright" />
	</footer>
	<!--footer section end-->

	</div>
	<!-- main content end-->
</section>
<script src="__PUBLIC__/TciocEx/js/jquery-1.10.2.min.js"></script>
<script src="__PUBLIC__/js/wind.js"></script>
<script src="__PUBLIC__/js/common.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery-ui-1.9.2.custom.min.js"></script>
<script src="__PUBLIC__/simpleboot/bootstrap/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery-migrate-1.2.1.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/modernizr.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/jquery.nicescroll.js"></script>
<script src="__PUBLIC__/js/ajaxForm.js"></script>

<script type="text/javascript" src="__PUBLIC__/TciocEx/js/jquery.validate.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/validation-localization/messages_zh.min.js"></script>
<script src="__PUBLIC__/TciocEx/js/scripts.js"></script>
<script src="__PUBLIC__/TciocEx/js/validation-init.js"></script>

</body>
</html>